#version 460
#define GLSLIFY 1

#define GLSLIFY 1
#define COLOR_BUILD

vec4 f_buildColor(in uint color){
	vec4 TColor;
	TColor.r = float((color & 0xff000000) >> 24) / 255.0;
	TColor.g = float((color & 0x00ff0000) >> 16) / 255.0;
	TColor.b = float((color & 0x0000ff00) >> 8) / 255.0;
	TColor.a = float((color & 0x000000ff)) / 255.0;

	return TColor;
}

layout(std140, set=0, binding=5) uniform U5_Uniform {
	vec4 m_BaseColor;
	//高光颜色
	vec4 m_SpecularColor;
	//自发光颜色
	vec4 m_EmissionColor;

	//反射强度
	float m_ReflexStrength;
	//折射强度
	float m_RefractStrength;
	//高光强度
	float m_SpecularStrength;
	//自发光强度
	float m_EmissionStrength;
	
};

layout(binding = 10) uniform sampler2D texColor;
layout(binding = 11) uniform sampler2D texSpecularColor;
layout(binding = 12) uniform sampler2D texReflexStrength;
layout(binding = 14) uniform sampler2D texRefractStrength;
layout(binding = 15) uniform sampler2D texEmissionStrength;

layout(location=0) out vec4 outColor;

void main(void){
	//outColor = vColor;
	outColor = f_buildColor(m_Color);
}

